package main

import (
	"fmt"
	"github.com/xinglou123/pkg/xserver"
	"xl_api/routers"
)

func main() {
	httpserver, err := xserver.NewServerHttp(xserver.Config{Address: ":8600", ReadTimeout: 30, WriteTimeout: 30})
	if err != nil {
		fmt.Println(err)
		return
	}
	httpserver.Router = routers.InitRouter()
	err = httpserver.Listen()
	defer httpserver.Close()
	if err != nil {
		fmt.Println(err)
		return
	}
}
